{template 'web/common/common'}
{template 'web/goods/navbar'}
<link rel="stylesheet" type="text/css" href="../addons/kundian_farm/resource/css/style.css" />
<div class="panel panel-success">
    <div class="panel-heading">
        <h3 class="panel-title">
            产品溯源编辑
        </h3>
    </div>
    <div class="panel-body">
        <form id="sign-form" class="form-horizontal" role="form" method="post" action="{url 'site/entry/trace',array('m'=>'kundian_farm','op'=>'trace_edit_save','version_id'=>$_GPC['version_id'])}" name="submit" style="padding: 20px 0;">
            <div class="form-group">
                <label class="col-sm-2 control-label">溯源名称</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control"  name="trace_name" id="trace_name" value="{$list['trace_name']}">
                </div>
            </div>
            <div class="form-group">
                <label  class="col-sm-2 control-label">溯源描述</label>
                <div class="col-sm-8">
                    <textarea name="trace_desc" id="trace_desc" cols="30" rows="10" class="form-control">{$list['trace_desc']}</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">图标(60*60)</label>
                <div class="col-sm-8">
                    {php echo tpl_form_field_multi_image('img',$list['img']);}
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">时间</label>
                <div class="col-sm-8">
                    {if $list['trace_time']!=0}
                    <input type="date" class="form-control"  name="trace_time" value="<?php echo date('Y-m-d',$list['trace_time']);?>">
                    {else}
                    <input type="date" class="form-control"  name="trace_time" value="">
                    {/if}
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">排序</label>
                <div class="col-sm-8">
                    <input type="number" class="form-control"  name="rank" value="{$list['rank']}">
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <input type="hidden" value="{$list['id']}" name="id"/>
                    <input type="hidden" value="{$trace_id}" name="trace_id"/>
                    <input type="submit" name="submit" class="btn btn-default">
                    <a class="btn btn-default" href="{url 'site/entry/trace',array('m'=>'kundian_farm','op'=>'trace_list','id'=>$trace_id)}">返回</a>
                </div>
            </div>
        </form>
    </div>
</div>
